********************************************************************************
*																				*
* 		This Do-File produces table 1, 2, A2, A3 and A4							*
*																				*
*********************************************************************************

/* 
Replication Material for:
Maria Preißinger & Harald Schoen (2016): It's not always the campaign - 
Explaining inter-elction switching in Germany, 2009-2013. Electoral Studies.

Date: Sep 2016
*/


*------------------------------------------------------------------------------
* Table 1: Frequencies of switchers at different levels of political interest
*------------------------------------------------------------------------------

* Inter-election switch
sum wechsler if a_polikatnew!=.
sum wechsler if a_polikatnew==-1
sum wechsler if a_polikatnew==0
sum wechsler if a_polikatnew==1

* Between-campaign switch
sum earlywechsler if a_polikatnew!=.
sum earlywechsler if a_polikatnew==-1
sum earlywechsler if a_polikatnew==0
sum earlywechsler if a_polikatnew==1

* Campaign Switch 2013
sum b_kampwechs_nb if a_polikatnew!=.
sum b_kampwechs_nb if a_polikatnew==-1
sum b_kampwechs_nb if a_polikatnew==0
sum b_kampwechs_nb if a_polikatnew==1	
	
	
*-----------------------------------------------------------------
* Table 2: Individual patterns of electoral decision making
*-----------------------------------------------------------------

fre pattern_voters if a_polikatnew!=.
bysort a_polikatnew: fre pattern_voters


*----------------------------------------------------------
* Table 3: Frequency of attitide change
*-------------------------------------------------------------

mean kat_*abs* if wkp0913==3 & a_polikatnew!=.
mean kat_*abs* if wkp0913==3 & a_polikatnew==-1
mean kat_*abs* if wkp0913==3 & a_polikatnew==0
mean kat_*abs* if wkp0913==3 & a_polikatnew==1



*---------------------------------------------------------------------------
* Table A2: Panel Attrition in GLES campaign panel surveys 2009 to 2013
*-------------------------------------------------------------------------

est clear
eststo: estpost sum a_kampwechs_nb a_poli2 a_newpidno1 a_*vote*7 if wkp0913==2
eststo: estpost sum a_kampwechs_nb a_poli2 a_newpidno1 a_*vote*7 if wkp0913==3

esttab est1 est2 using attrition.rtf, ///
	cells(mean(fmt(2)) count(fmt(0) label(N))) ///
	mtitle("only 2009" "2009 and 2013") nonumbers ///
	title("Table A2: Panel Attrition") noobs ///
	coeflabel(a_kampwechs_nb "campaign switching 09" ///
	a_poli2 "political interest 09 W2" ///
	a_newpidno1 "no PID 09 W1")
	

*------------------------------------------------------------------
* Table A3: Individual patterns of electoral decision making with 
* campaign waverers excluded
*-------------------------------------------------------------------

* identify waveres: vote intention in w1 and final vote choice
* for same party, but wavering in between
gen instableinbetween = 1 if b_wabsfull1==b_wabsfull7 ///
	& b_wabsfull7~=. & ///
	b_kampwechs_nb==1	

estimates clear	
fre pattern_voters if b_kampwechs_nb~=.	//reducing to camopaign switch sample
fre pattern_voters if b_kampwechs_nb~=. & instableinbetween~=1


*------------------------------------------------------------------------------
* Table A4: Individual patterns of electoral decision-making using a recall
* measure of 2009 vote choice
*-----------------------------------------------------------------------------

fre recallpattern_voters if pattern_voters!=. & a_polikatnew!=.
bysort a_polikatnew: fre recallpattern_voters if pattern_voters!=.








